3.105 \(\int \sin (a+\frac{b}{x}) \, dx\)

Optimal. Leaf size=32 \[ -b \cos (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \sin (a) \text{Si}\left (\frac{b}{x}\right )+x \sin \left (a+\frac{b}{x}\right ) \]

[Out]

-(b*Cos[a]*CosIntegral[b/x]) + x*Sin[a + b/x] + b*Sin[a]*SinIntegral[b/x]

________________________________________________________________________________________

Rubi [A]  time = 0.0722976, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {3361, 3297, 3303, 3299, 3302} \[ -b \cos (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \sin (a) \text{Si}\left (\frac{b}{x}\right )+x \sin \left (a+\frac{b}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b/x],x]

[Out]

-(b*Cos[a]*CosIntegral[b/x]) + x*Sin[a + b/x] + b*Sin[a]*SinIntegral[b/x]

Rule 3361

Int[((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_Symbol] :> Dist[1/(n*f), Subst[Int[x
^(1/n - 1)*(a + b*Sin[c + d*x])^p, x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 0] && In
tegerQ[1/n]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \sin \left (a+\frac{b}{x}\right ) \, dx &=-\operatorname{Subst}\left (\int \frac{\sin (a+b x)}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=x \sin \left (a+\frac{b}{x}\right )-b \operatorname{Subst}\left (\int \frac{\cos (a+b x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=x \sin \left (a+\frac{b}{x}\right )-(b \cos (a)) \operatorname{Subst}\left (\int \frac{\cos (b x)}{x} \, dx,x,\frac{1}{x}\right )+(b \sin (a)) \operatorname{Subst}\left (\int \frac{\sin (b x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=-b \cos (a) \text{Ci}\left (\frac{b}{x}\right )+x \sin \left (a+\frac{b}{x}\right )+b \sin (a) \text{Si}\left (\frac{b}{x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0229493, size = 32, normalized size = 1. \[ -b \cos (a) \text{CosIntegral}\left (\frac{b}{x}\right )+b \sin (a) \text{Si}\left (\frac{b}{x}\right )+x \sin \left (a+\frac{b}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b/x],x]

[Out]

-(b*Cos[a]*CosIntegral[b/x]) + x*Sin[a + b/x] + b*Sin[a]*SinIntegral[b/x]

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 38, normalized size = 1.2 \begin{align*} -b \left ( -{\frac{x}{b}\sin \left ( a+{\frac{b}{x}} \right ) }-{\it Si} \left ({\frac{b}{x}} \right ) \sin \left ( a \right ) +{\it Ci} \left ({\frac{b}{x}} \right ) \cos \left ( a \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b/x),x)

[Out]

-b*(-sin(a+b/x)*x/b-Si(b/x)*sin(a)+Ci(b/x)*cos(a))

________________________________________________________________________________________

Maxima [C]  time = 1.14259, size = 78, normalized size = 2.44 \begin{align*} -\frac{1}{2} \,{\left ({\left ({\rm Ei}\left (\frac{i \, b}{x}\right ) +{\rm Ei}\left (-\frac{i \, b}{x}\right )\right )} \cos \left (a\right ) -{\left (-i \,{\rm Ei}\left (\frac{i \, b}{x}\right ) + i \,{\rm Ei}\left (-\frac{i \, b}{x}\right )\right )} \sin \left (a\right )\right )} b + x \sin \left (\frac{a x + b}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x),x, algorithm="maxima")

[Out]

-1/2*((Ei(I*b/x) + Ei(-I*b/x))*cos(a) - (-I*Ei(I*b/x) + I*Ei(-I*b/x))*sin(a))*b + x*sin((a*x + b)/x)

________________________________________________________________________________________

Fricas [A]  time = 1.93744, size = 144, normalized size = 4.5 \begin{align*} b \sin \left (a\right ) \operatorname{Si}\left (\frac{b}{x}\right ) - \frac{1}{2} \,{\left (b \operatorname{Ci}\left (\frac{b}{x}\right ) + b \operatorname{Ci}\left (-\frac{b}{x}\right )\right )} \cos \left (a\right ) + x \sin \left (\frac{a x + b}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x),x, algorithm="fricas")

[Out]

b*sin(a)*sin_integral(b/x) - 1/2*(b*cos_integral(b/x) + b*cos_integral(-b/x))*cos(a) + x*sin((a*x + b)/x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin{\left (a + \frac{b}{x} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x),x)

[Out]

Integral(sin(a + b/x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin \left (a + \frac{b}{x}\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x),x, algorithm="giac")

[Out]

integrate(sin(a + b/x), x)